<?php
/**
 * Created by JetBrains PhpStorm.
 * User: valera
 * Date: 8/15/11
 * Time: 10:11 PM
 * To change this template use File | Settings | File Templates.
 */
 class Resource_Sphinx {
     public function __construct() {
         $config = ZendX_Config_Manager::getInstance()->getConfig('sphinx');
         include_once($config->apiUrl);
         $sphinx = new SphinxClient();
         $sphinx->SetServer($config->host, (int) $config->port);
         $sphinx->SetMatchMode(SPH_MATCH_EXTENDED2);
         $sphinx->Open();
         Zend_Registry::set('SphinxClient', $sphinx);
     }
 }
